package cjh;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import model.ProfessorVO;
import model.StudentVO;
import javax.swing.SwingConstants;


// 메인창
public class Stu_main extends JPanel {
	
	public Stu_main() {
		
	setLayout(new BorderLayout(0, 0));
		
	
	up();
	center();	
		
	}
			
private void up(){
	
	
	StudentVO s = new StudentVO();
	
	
	JPanel myinfo = new JPanel();
	myinfo.setLayout( new BorderLayout( 0, 0 ) );
	
	add(myinfo, BorderLayout.NORTH);
	
	JPanel titlep = new JPanel();
	myinfo.add( titlep, BorderLayout.NORTH );
	
	JLabel titlelbl = new JLabel("개인정보");
	titlep.add( titlelbl );
	
	
	
	
	JPanel infomation = new JPanel();
	myinfo.add(infomation, BorderLayout.CENTER );
	infomation.setLayout(new GridLayout(0, 2, 0, 0));
	
	
	
	
	JPanel stuValue = new JPanel();
	stuValue.setLayout( new GridLayout(2, 0, 0, 0) );
	
	
	JPanel panel_4 = new JPanel();
	stuValue.add(panel_4);
	
	JLabel lblNewLabel = new JLabel("학번");
	panel_4.add(lblNewLabel);
	
	JPanel panel_5 = new JPanel();
	stuValue.add(panel_5);
	
	JLabel lblNewLabel_1 = new JLabel("이름");
	panel_5.add(lblNewLabel_1);
	
	JPanel stuImg = new JPanel();
	stuImg.setLayout( new BorderLayout(0, 0) );
	
	
	
	
	infomation.add(stuImg, BorderLayout.WEST);
	
	JLabel label = new JLabel("사진");
	label.setHorizontalAlignment(SwingConstants.CENTER);
	stuImg.add(label, BorderLayout.CENTER);
	infomation.add(stuValue, BorderLayout.SOUTH);
	
	JPanel panel_2 = new JPanel();
	stuValue.add(panel_2);
	
	JLabel lblNewLabel_2 = new JLabel("소속학과");
	panel_2.add(lblNewLabel_2);
	
	JPanel panel_3 = new JPanel();
	stuValue.add(panel_3);
	
	JLabel lblNewLabel_3 = new JLabel("연락처");
	panel_3.add(lblNewLabel_3);
	
	JPanel panel_6 = new JPanel();
	stuValue.add(panel_6);
	
	JPanel panel_7 = new JPanel();
	stuValue.add(panel_7);
	
	JPanel panel_8 = new JPanel();
	stuValue.add(panel_8);
	
	JPanel panel_9 = new JPanel();
	stuValue.add(panel_9);
	
	
	
	
	
	
	
	
	
	
}



private void center(){
	ProfessorVO p = new ProfessorVO();
	StudentVO s = new StudentVO();
	
	JPanel center = new JPanel();
	add(center, BorderLayout.CENTER);
	
	
	center.setLayout(new GridLayout(0, 2, 0, 0));
	JPanel b_leftPanel = new JPanel();
	b_leftPanel.setLayout( new BorderLayout(0, 0));
		center.add(b_leftPanel);
		
		JPanel sungjuk = new JPanel();
		b_leftPanel.add(sungjuk, BorderLayout.NORTH);
		
		JLabel sung = new JLabel("스페이싱");
		sungjuk.add(sung);
		
		JPanel panel_1 = new JPanel();
		b_leftPanel.add(panel_1, BorderLayout.CENTER);
		panel_1.setLayout(new BorderLayout(0, 0));
		
		JPanel sungjukmenu = new JPanel();
		panel_1.add(sungjukmenu, BorderLayout.NORTH);
		
		
		
		JLabel subject = new JLabel("수강내역");
		sungjukmenu.add(subject);
		
		JPanel page = new JPanel();
		panel_1.add(page, BorderLayout.CENTER);
		
		JLabel lblNewLabel_13 = new JLabel("물리");
		page.add(lblNewLabel_13);
		
		JLabel label_2 = new JLabel(p.getProf_name());
		page.add(label_2);
		
		JLabel label_4 = new JLabel(s.getTot_point());
		page.add(label_4);
		

	
	JPanel rightPanel = new JPanel();
	rightPanel.setLayout( new BorderLayout( 0, 0) );

	JPanel register = new JPanel();
	rightPanel.add(register, BorderLayout.NORTH);
	
	JLabel registerlab = new JLabel("스페이싱");
	register.add(registerlab);
	
	
	
	JPanel panel_6 = new JPanel();
	
	
	rightPanel.add(panel_6, BorderLayout.CENTER);
	panel_6.setLayout(new BorderLayout(0, 0));
	
	JPanel registermenu = new JPanel();
	panel_6.add(registermenu, BorderLayout.NORTH);
	
	JLabel point_2 = new JLabel("성적조회");
	registermenu.add(point_2);
	
	JPanel registerpage = new JPanel();
	panel_6.add(registerpage, BorderLayout.CENTER);
	
	JLabel label_7 = new JLabel("");
	registerpage.add(label_7);
	
	JLabel lblNewLabel_18 = new JLabel("");
	registerpage.add(lblNewLabel_18);
	
	JLabel label_6 = new JLabel("");
	registerpage.add(label_6);
	
	JLabel lblNewLabel_15 = new JLabel("2");
	registerpage.add(lblNewLabel_15);
	center.add(rightPanel);
	
}
}

